package com.zsl.picture.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.Query;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zsl.picture.mapper.MessagesMapper;
import com.zsl.picture.model.Photo;
import com.zsl.picture.mapper.PhotoMapper;
import com.zsl.picture.service.PhotoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 存放照片 服务实现类
 * </p>
 *
 * @author zsl
 * @since 2022-03-03
 */
@Service
public class PhotoServiceImpl extends ServiceImpl<PhotoMapper, Photo> implements PhotoService {
    @Autowired
    PhotoMapper photoMapper;

    @Autowired
    MessagesMapper messagesMapper;

    @Override
    public IPage<Photo> queryPage(Photo photo) {
        Page<Photo> page = new Page<Photo>().setRecords(photoMapper.selectPhotos(photo));
        return page;
    }
}
